Skip to main content

Get Tool Agent Count

Used to retrieve the number of AI agents currently using a specific tool. This provides insights into tool adoption and usage across your project.

API Endpoint

PropertyValue
Request MethodGET
Request URLhttps://api.seliseblocks.com/tools/{tool_id}/agent-count

Request

Request Example

curl -X GET 'https://api.seliseblocks.com/tools/{tool_id}/agent-count?project_key=YOUR_PROJECT_KEY' \
-H 'accept: application/json'

Path Parameters

FieldTypeRequiredDescription
tool_idstringYesThe unique identifier of the tool.

Query Parameters

FieldTypeRequiredDescription
project_keystringNoThe project key for your project.

Request Headers

FieldTypeRequiredDescription
acceptstringYesAccepted response format. Use application/json
note

Agent Count Information

  • Counts only active AI agents that have the tool configured
  • Includes agents in all statuses (active, inactive, testing)
  • Updated in real-time as agents are added or removed
  • Useful for understanding tool adoption and dependencies
tip

Use cases for agent count:

  • Monitoring tool adoption across your organization
  • Identifying popular and underutilized tools
  • Assessing impact before making changes to a tool
  • Planning tool deprecation or migration
  • Understanding dependencies before deletion
  • Tracking tool usage growth over time

This information helps you:

  • Make informed decisions about tool maintenance
  • Prioritize support and improvements for widely-used tools
  • Identify tools that can be safely deprecated
  • Plan capacity and resource allocation
  • Communicate changes to affected teams

Response

Success Response (200 OK)

Returns the count of agents using the tool.

{
"success": true,
"message": "Agent count retrieved successfully",
"data": 12,
"status_code": 200
}

Response Fields

FieldTypeDescription
successbooleanIndicates whether the request was successful.
messagestringHuman-readable status message.
dataintegerNumber of AI agents using this tool.
status_codeintegerHTTP status code (200 for success).

Zero Agents Response

Returns when no agents are using the tool.

{
"success": true,
"message": "No agents currently using this tool",
"data": 0,
"status_code": 200
}
note

A count of 0 indicates that:

  • The tool is not currently configured in any AI agents
  • The tool is new and hasn't been adopted yet
  • The tool may be a candidate for deprecation
  • It's safe to delete the tool without affecting active agents

Error Response (422 Unprocessable Entity)

Returns validation error details when the request parameters are invalid.

{
"detail": [
{
"loc": [
"path",
"tool_id"
],
"msg": "tool not found",
"type": "value_error.notfound"
}
]
}

Error Response Fields

FieldTypeDescription
detailarrayArray of validation error objects.
locarrayLocation of the error in the request (e.g., path, query).
msgstringHuman-readable error message.
typestringError type identifier.

Interpreting Agent Count

Agent CountInterpretationRecommended Actions
0Tool is not being usedSafe to delete; consider deprecation
1-5Low adoptionInvestigate reasons; promote usage or deprecate
6-20Moderate adoptionMonitor usage; plan carefully before changes
21-50High adoptionCritical tool; changes require careful planning
50+Very high adoptionMission-critical; coordinate changes widely

Error Codes

Status CodeDescriptionResponse Type
200Successful ResponseSuccess
400Bad Request - Invalid requestBad Request
404Not Found - Tool does not existNot Found
422Validation Error - Invalid request parametersUnprocessable Entity